﻿using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using zhangmenren.Db;
using zhangmenren.Models;
using zhangmenren.Models.Enums;
using zhangmenren.Models.ViewModle;

namespace zhangmenren.IService
{
    public interface IWorksService: IDependency
    {
        Task<int> Add(WorksEntity banner);

        Task<IEnumerable<WorksModel>> Selelct(int index, int page,string key);

        Task<IEnumerable<WorksModel>> SelelctTuiJian();
        Task<IEnumerable<WorksModel>> Selelct(WorkType type, string key,int num=0);


        Task<int> Del(int id);

        Task<int> EditState(int id, bool state);

        Task<int> EditSort(int id, int sort);

        Task<int> IsXianShi(int id, bool isrecommend);

        Task<WorksModel> FindById(int id);

		/// <summary>
		/// 根据掌门id进行查找
		/// </summary>
		/// <param name="zmid"></param>
		/// <returns></returns>
		Task<IEnumerable<WorksEntity>> FindByZMId(int zmid);

	}
}
